package edu.zhku.myio;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class MyWrite {
	public static void main(String args[]){
		FileOutputStream fos = null;
		OutputStreamWriter osw = null;
		try{
			fos = new FileOutputStream("E:\\1.txt");
			osw = new OutputStreamWriter(fos);
			osw.write("Hello");
			osw.flush();
		}catch(Exception e){
			e.printStackTrace();
		}finally{
			try{
				osw.close();
			}catch(Exception e){
				e.printStackTrace();
			}
			try{
				fos.close();
			}catch(Exception e){
				e.printStackTrace();
			}
		}
	}
}
